#!/usr/bin/expect -f
  set user root
  set host 114.55.224.242
  set password XT3brTvihUP1yyZQ
  set timeout -1
 
  set dir [exec sh -c pwd]

 cd src/
 spawn scp -r $dir/src $user@$host:/mnt/text_classify/fasttext/
 expect {  
 "(yes/no)?"  
  {  
    send "yes\n"  
    expect "*assword:" { send "$password\n"}  
  }  
 "*assword:"  
  {  
    send "$password\n"  
  }  
}  
expect "100%"  
expect eof 